﻿// <copyright file="Book.cs" company="Microsoft Corporation">
// Copyright (c) 2008 All Right Reserved
// </copyright>
// <author>Michael S. Scherotter</author>
// <email>mischero@microsoft.com</email>
// <date>2009-03-3</date>
// <summary>Book class</summary>

namespace NYTimes.Data
{
    using System;
    using System.Collections.Generic;
    using System.Diagnostics.CodeAnalysis;

    /// <summary>
    /// Book listing
    /// </summary>
    public class Book
    {
        /// <summary>
        /// Gets or sets the book details
        /// </summary>
        public BookDetail Details { get; set; }

        /// <summary>
        /// Gets or sets the rank history for the book
        /// </summary>
        public IEnumerable<BookRank> RanksHistory { get; set; }

        /// <summary>
        /// Gets or sets the current rank for the book
        /// </summary>
        public BookRank Rank { get; set; }

        /// <summary>
        /// Gets or sets the ISBNs
        /// </summary>
        [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "ISBNs", Justification = "ISBN is a known acronym.")]
        public IEnumerable<ISBN> ISBNs { get; set; }

        /// <summary>
        /// Gets or sets the reviews
        /// </summary>
        public IEnumerable<Review> Reviews { get; set; }

        /// <summary>
        /// returns a string with all of the non-null properties and values
        /// </summary>
        /// <returns>a string with all of the non-null properties and values</returns>
        public override string ToString()
        {
            return Synergist.Utility.GetProperties(this);
        }
    }
}
